
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>A Very Warmth Welcome</title>
    </head>
    <body>
        <h1>A Very Warmth Welcome!</h1>
        <form method="POST" action="p1ex1.jsp?sayHello=true">
            Student Name: <input type="text" name="name" value="" width="20" /><br><br>
            <input type="submit" value="Submit" />
        </form>
        <jsp:useBean id="now" class="java.util.Date" />
        <c:if test="${param.sayHello}">
            <!-- Let's welcome the user ${param.name} -->
            Hello ${param.name}!<br>
            <br>Time now is: <c:out value="${now}" />
            <br />
            <script>
                document.write(new Date())
            </script>
        </c:if>
    </body>
</html>